1、Astra camera calibration

Wiki:http://wiki.ros.org/camera_calibration

Official website link:https://orbbec3d.com/develop/

Astra camera:https://github.com/orbbec/ros_astra_camera

Due to the internal and external reasons of the camera, the image will be greatly distorted, mainly radial deformation and tangential deformation, which cause the straight line to become curved. The farther the pixel is from the center of the image, the more serious the distortion. In order to avoid errors caused by the data source, it is necessary to calibrate the parameters of the camera.

 

Disadvantages of infrared depth camera ranging:

(1) It is impossible to accurately measure the distance of a black object, because the black substance can absorb infrared rays, and the infrared rays cannot return, so the distance measurement cannot be performed.

(2) It is impossible to accurately measure the distance of the mirror-reflecting object, because only when the depth camera is on the vertical line of the mirror-surface object, the receiver can receive the reflected infrared rays, and it will cause overexposure.

(3) It is impossible to accurately measure the distance of transparent objects, because infrared rays can pass through transparent objects.

(4) It is impossible to accurately measure the distance of objects that are too close.

image-20210909103701194

1.1、Preparation before calibration

Checkerboard (calibration board)

image-20210907171706358

Obi Zhongguang camera model and corresponding launch file

Launch fileStart the camera model
astra.launchAstra,Astra S,Astra mini,Astra mini S
astraplus.launchAstra plus
astrapro.launchAstra pro
embedded_s.launchDeeyea
dabai_u3.launchDabai
gemini.launchGemini

Device view

image-20210909092021734

Depth Camera ID: 2bc5:0403

Color camera ID: 2bc5:0501

The appearance of these two IDs indicates that the device is connected.

1.2、calibration

Satrt up Astra camera

View picture topic

image-20210908215708748

Start the calibration node

size: The number of internal corners of the calibrated checkerboard, such as 9X6, the corners have six rows and nine columns.

square: The side length of the checkerboard, in meters.

image and camera: Set the topic of the image released by the camera.

1.2.1、Color image Calibration

image-20210907180204879

Calibration interface

X: The left and right movement of the checkerboard in the camera field of view

Y: The checkerboard moves up and down in the camera's field of view

Size: the back and forth movement of the checkerboard in the camera's field of view

Skew: The tilt and rotation of the checkerboard in the camera field of view

After the startup is successful, put the checkerboard into the center of the screen and change different poses. The system will recognize it autonomously. In the best case, the lines under [X], [Y], [Size], and [Skew] will first change from red to yellow and then to green as the data is collected, filling them as much as possible.

image-20210907183329713

Click [CALIBRATE] to calculate the camera internal parameters, the more pictures, the longer the time, just wait.

image-20210907184245152

Click [SAVE] to save the uncalibrated result, the bottom line appears, click [COMMIT] to exit.

image-20210908220248183

After the calibration, the calibration result is stored in [/tmp/calibrationdata.tar.gz], you can move it out to see the content

After decompression, there are the image just calibrated, an ost.txt file and an ost.yaml file. The yaml file is what we need, but it needs to be modified before it can be used.

-Change ost.yaml to head_camera.yaml -Change the name of camera_name: to head_camera -Move the file to ~/.ros/camera_info folder

1.2.2、Depth image calibration

Start the calibration node

size: The number of internal corners of the calibrated checkerboard, such as 9X6, the corners have six rows and nine columns.

square: The side length of the checkerboard, in meters.

image and camera: Set the topic of the image released by the camera.

The calibration process is similar to color camera calibration, but the visualization of depth camera calibration is not so intuitive; it just displays the calibration result when it is recognized, and it is completely dark when it is not recognized.

image-20210909094545422

The following operations are similar to color camera calibration, changing different poses. The system will recognize it autonomously. In the best case, the lines under [X], [Y], [Size], and [Skew] will first change from red to yellow and then to green as the data is collected, filling them as much as possible. Click [CALIBRATE] to calculate the camera internal parameters, the more pictures, the longer the time, just wait.

Click [SAVE] to save the non-calibration result, the bottom line appears, click [COMMIT] to exit. After the calibration, the calibration result is stored in [/tmp/calibrationdata.tar.gz], you can move it out to see the content.

 

After decompression, there are the image just calibrated, an ost.txt file and an ost.yaml file. The yaml file is what we need, but it needs to be modified before it can be used.